<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>3dchess: ConsolePlayer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">3dchess
   </div>
   <div id="projectbrief">Basic chess application with OpenGL graphics and AI</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_console_player-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ConsolePlayer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class which takes human player interaction from a console.  
 <a href="class_console_player.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_console_player_8h_source.html">ConsolePlayer.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ConsolePlayer:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_console_player.png" usemap="#ConsolePlayer_map" alt=""/>
  <map id="ConsolePlayer_map" name="ConsolePlayer_map">
<area href="class_abstract_player.html" title="Class a player has to implement to interact with the GameLogic. " alt="AbstractPlayer" shape="rect" coords="0,56,157,80"/>
<area href="class_service_dispatcher_thread.html" title="Provides functionality for safely running operations in a thread. " alt="ServiceDispatcherThread" shape="rect" coords="167,56,324,80"/>
<area href="class_abstract_game_observer.html" title="Allows to observe relevant GameEvents inside the GameLogic. " alt="AbstractGameObserver" shape="rect" coords="0,0,157,24"/>
<area href="class_service_dispatcher.html" title="Provides functionality for safely running operations in a thread. " alt="ServiceDispatcher" shape="rect" coords="167,0,324,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5acd643839da6578a9efb15b73ed4d07"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_console_player.html#a5acd643839da6578a9efb15b73ed4d07">onSetColor</a> (PlayerColor color) override</td></tr>
<tr class="memdesc:a5acd643839da6578a9efb15b73ed4d07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifies that player what color he will be playing.  <a href="#a5acd643839da6578a9efb15b73ed4d07">More...</a><br/></td></tr>
<tr class="separator:a5acd643839da6578a9efb15b73ed4d07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a155dbe90c6ae613bf5f37034d496c6f3"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_console_player.html#a155dbe90c6ae613bf5f37034d496c6f3">onGameStart</a> (<a class="el" href="class_game_state.html">GameState</a> state, <a class="el" href="class_game_configuration.html">GameConfiguration</a> config) override</td></tr>
<tr class="memdesc:a155dbe90c6ae613bf5f37034d496c6f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when the game starts.  <a href="#a155dbe90c6ae613bf5f37034d496c6f3">More...</a><br/></td></tr>
<tr class="separator:a155dbe90c6ae613bf5f37034d496c6f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa464032047ef729c748fc9664739c74f"><td class="memItemLeft" align="right" valign="top">virtual std::future&lt; <a class="el" href="class_turn.html">Turn</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_console_player.html#aa464032047ef729c748fc9664739c74f">doMakeTurn</a> (<a class="el" href="class_game_state.html">GameState</a> state) override</td></tr>
<tr class="memdesc:aa464032047ef729c748fc9664739c74f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Asks the player to make his turn.  <a href="#aa464032047ef729c748fc9664739c74f">More...</a><br/></td></tr>
<tr class="separator:aa464032047ef729c748fc9664739c74f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0af6ecb4eb186287510ddbd2f68a061"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_console_player.html#ac0af6ecb4eb186287510ddbd2f68a061">onTurnEnd</a> (PlayerColor color, <a class="el" href="class_turn.html">Turn</a> turn, <a class="el" href="class_game_state.html">GameState</a> newState) override</td></tr>
<tr class="memdesc:ac0af6ecb4eb186287510ddbd2f68a061"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called if a player ended its turn.  <a href="#ac0af6ecb4eb186287510ddbd2f68a061">More...</a><br/></td></tr>
<tr class="separator:ac0af6ecb4eb186287510ddbd2f68a061"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9129b83d6fdef0083fca3c96f2fecae1"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_console_player.html#a9129b83d6fdef0083fca3c96f2fecae1">doAbortTurn</a> () override</td></tr>
<tr class="memdesc:a9129b83d6fdef0083fca3c96f2fecae1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Asks the player to abort a turn asked for with doMakeTurn.  <a href="#a9129b83d6fdef0083fca3c96f2fecae1">More...</a><br/></td></tr>
<tr class="separator:a9129b83d6fdef0083fca3c96f2fecae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a639c4cc842569ce328ab396cdac43533"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_console_player.html#a639c4cc842569ce328ab396cdac43533">onGameOver</a> (<a class="el" href="class_game_state.html">GameState</a> state, PlayerColor winner) override</td></tr>
<tr class="memdesc:a639c4cc842569ce328ab396cdac43533"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when a game started with onGameStart is over.  <a href="#a639c4cc842569ce328ab396cdac43533">More...</a><br/></td></tr>
<tr class="separator:a639c4cc842569ce328ab396cdac43533"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_abstract_game_observer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_abstract_game_observer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_abstract_game_observer.html">AbstractGameObserver</a></td></tr>
<tr class="memitem:a64dd519a6445dc104e7387b394c0286e inherit pub_methods_class_abstract_game_observer"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_observer.html#a64dd519a6445dc104e7387b394c0286e">onTurnStart</a> (PlayerColor who)</td></tr>
<tr class="memdesc:a64dd519a6445dc104e7387b394c0286e inherit pub_methods_class_abstract_game_observer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called if a player is asked to perform a turn.  <a href="#a64dd519a6445dc104e7387b394c0286e">More...</a><br/></td></tr>
<tr class="separator:a64dd519a6445dc104e7387b394c0286e inherit pub_methods_class_abstract_game_observer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74ba4cdca13bb0227722beeeebfd6e12 inherit pub_methods_class_abstract_game_observer"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_observer.html#a74ba4cdca13bb0227722beeeebfd6e12">onTurnTimeout</a> (PlayerColor who, std::chrono::seconds timeout)</td></tr>
<tr class="memdesc:a74ba4cdca13bb0227722beeeebfd6e12 inherit pub_methods_class_abstract_game_observer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called if a players turn is aborted due to timeout.  <a href="#a74ba4cdca13bb0227722beeeebfd6e12">More...</a><br/></td></tr>
<tr class="separator:a74ba4cdca13bb0227722beeeebfd6e12 inherit pub_methods_class_abstract_game_observer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_service_dispatcher_thread"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_service_dispatcher_thread')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_service_dispatcher_thread.html">ServiceDispatcherThread</a></td></tr>
<tr class="memitem:a0b3eccc5281c04d103313dd82c27a55b inherit pub_methods_class_service_dispatcher_thread"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher_thread.html#a0b3eccc5281c04d103313dd82c27a55b">ServiceDispatcherThread</a> ()</td></tr>
<tr class="memdesc:a0b3eccc5281c04d103313dd82c27a55b inherit pub_methods_class_service_dispatcher_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="class_service_dispatcher_thread.html" title="Provides functionality for safely running operations in a thread. ">ServiceDispatcherThread</a>.  <a href="#a0b3eccc5281c04d103313dd82c27a55b">More...</a><br/></td></tr>
<tr class="separator:a0b3eccc5281c04d103313dd82c27a55b inherit pub_methods_class_service_dispatcher_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acac4f20b7ea84e406f562a155c375ad0 inherit pub_methods_class_service_dispatcher_thread"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher_thread.html#acac4f20b7ea84e406f562a155c375ad0">~ServiceDispatcherThread</a> ()</td></tr>
<tr class="memdesc:acac4f20b7ea84e406f562a155c375ad0 inherit pub_methods_class_service_dispatcher_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy dispatcher.  <a href="#acac4f20b7ea84e406f562a155c375ad0">More...</a><br/></td></tr>
<tr class="separator:acac4f20b7ea84e406f562a155c375ad0 inherit pub_methods_class_service_dispatcher_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4767fc26a82b644b3d8650a6036d1b0b inherit pub_methods_class_service_dispatcher_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4767fc26a82b644b3d8650a6036d1b0b"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher_thread.html#a4767fc26a82b644b3d8650a6036d1b0b">start</a> ()</td></tr>
<tr class="memdesc:a4767fc26a82b644b3d8650a6036d1b0b inherit pub_methods_class_service_dispatcher_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the dispatcher thread. <br/></td></tr>
<tr class="separator:a4767fc26a82b644b3d8650a6036d1b0b inherit pub_methods_class_service_dispatcher_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9054e054414b9e00bb626845845ca16 inherit pub_methods_class_service_dispatcher_thread"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher_thread.html#ae9054e054414b9e00bb626845845ca16">stop</a> (bool force=false)</td></tr>
<tr class="memdesc:ae9054e054414b9e00bb626845845ca16 inherit pub_methods_class_service_dispatcher_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the execution of this tread.  <a href="#ae9054e054414b9e00bb626845845ca16">More...</a><br/></td></tr>
<tr class="separator:ae9054e054414b9e00bb626845845ca16 inherit pub_methods_class_service_dispatcher_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_service_dispatcher"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_service_dispatcher')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_service_dispatcher.html">ServiceDispatcher</a></td></tr>
<tr class="memitem:a523e6f7dc4e533b0b7938cec62c55c6d inherit pub_methods_class_service_dispatcher"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher.html#a523e6f7dc4e533b0b7938cec62c55c6d">poll</a> ()</td></tr>
<tr class="memdesc:a523e6f7dc4e533b0b7938cec62c55c6d inherit pub_methods_class_service_dispatcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replays all posted functions in the calling thread.  <a href="#a523e6f7dc4e533b0b7938cec62c55c6d">More...</a><br/></td></tr>
<tr class="separator:a523e6f7dc4e533b0b7938cec62c55c6d inherit pub_methods_class_service_dispatcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a186adaf5f51776343ea7d952d1ddc199"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a186adaf5f51776343ea7d952d1ddc199"></a>
PlayerColor&#160;</td><td class="memItemRight" valign="bottom"><b>m_color</b></td></tr>
<tr class="separator:a186adaf5f51776343ea7d952d1ddc199"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_attribs_class_service_dispatcher_thread"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_class_service_dispatcher_thread')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="class_service_dispatcher_thread.html">ServiceDispatcherThread</a></td></tr>
<tr class="memitem:a63070986b7b56f644eaf6c63fbbc5330 inherit pub_attribs_class_service_dispatcher_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a63070986b7b56f644eaf6c63fbbc5330"></a>
std::thread&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher_thread.html#a63070986b7b56f644eaf6c63fbbc5330">m_thread</a></td></tr>
<tr class="memdesc:a63070986b7b56f644eaf6c63fbbc5330 inherit pub_attribs_class_service_dispatcher_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">Thread this object is running its event loop on after start. <br/></td></tr>
<tr class="separator:a63070986b7b56f644eaf6c63fbbc5330 inherit pub_attribs_class_service_dispatcher_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_class_service_dispatcher"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_service_dispatcher')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_service_dispatcher.html">ServiceDispatcher</a></td></tr>
<tr class="memitem:a51360fc052cab5a9bad17fd586081091 inherit pro_methods_class_service_dispatcher"><td class="memTemplParams" colspan="2">template&lt;typename Function &gt; </td></tr>
<tr class="memitem:a51360fc052cab5a9bad17fd586081091 inherit pro_methods_class_service_dispatcher"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_service_dispatcher.html#a51360fc052cab5a9bad17fd586081091">post</a> (Function &amp;&amp;function)</td></tr>
<tr class="memdesc:a51360fc052cab5a9bad17fd586081091 inherit pro_methods_class_service_dispatcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store a given function.  <a href="#a51360fc052cab5a9bad17fd586081091">More...</a><br/></td></tr>
<tr class="separator:a51360fc052cab5a9bad17fd586081091 inherit pro_methods_class_service_dispatcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1723f2592299a9bf4ac9e9557929cf52 inherit pro_methods_class_service_dispatcher"><td class="memTemplParams" colspan="2">template&lt;typename Function &gt; </td></tr>
<tr class="memitem:a1723f2592299a9bf4ac9e9557929cf52 inherit pro_methods_class_service_dispatcher"><td class="memTemplItemLeft" align="right" valign="top">auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_service_dispatcher.html#a1723f2592299a9bf4ac9e9557929cf52">postPromise</a> (Function &amp;&amp;function) -&gt; decltype(std::promise&lt; typename std::result_of&lt; Function()&gt;::type &gt;().get_future())</td></tr>
<tr class="memdesc:a1723f2592299a9bf4ac9e9557929cf52 inherit pro_methods_class_service_dispatcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores a given function and returns a future on its return value.  <a href="#a1723f2592299a9bf4ac9e9557929cf52">More...</a><br/></td></tr>
<tr class="separator:a1723f2592299a9bf4ac9e9557929cf52 inherit pro_methods_class_service_dispatcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d6309517ea11b6d646e787865c000a inherit pro_methods_class_service_dispatcher"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher.html#a92d6309517ea11b6d646e787865c000a">run</a> ()</td></tr>
<tr class="memdesc:a92d6309517ea11b6d646e787865c000a inherit pro_methods_class_service_dispatcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs underlying boost asio io_service.  <a href="#a92d6309517ea11b6d646e787865c000a">More...</a><br/></td></tr>
<tr class="separator:a92d6309517ea11b6d646e787865c000a inherit pro_methods_class_service_dispatcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8ad1909afe414cd27e21c8cdd214c6c inherit pro_methods_class_service_dispatcher"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad8ad1909afe414cd27e21c8cdd214c6c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher.html#ad8ad1909afe414cd27e21c8cdd214c6c">resetWork</a> ()</td></tr>
<tr class="memdesc:ad8ad1909afe414cd27e21c8cdd214c6c inherit pro_methods_class_service_dispatcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drops queued functions. <br/></td></tr>
<tr class="separator:ad8ad1909afe414cd27e21c8cdd214c6c inherit pro_methods_class_service_dispatcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bf54f65ee49a65d344581078d0a61b6 inherit pro_methods_class_service_dispatcher"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7bf54f65ee49a65d344581078d0a61b6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service_dispatcher.html#a7bf54f65ee49a65d344581078d0a61b6">stopService</a> ()</td></tr>
<tr class="memdesc:a7bf54f65ee49a65d344581078d0a61b6 inherit pro_methods_class_service_dispatcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops underlying service. <br/></td></tr>
<tr class="separator:a7bf54f65ee49a65d344581078d0a61b6 inherit pro_methods_class_service_dispatcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class which takes human player interaction from a console. </p>
<dl class="section warning"><dt>Warning</dt><dd>Has serious issues on turn timeout due to blocking console reads. </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a9129b83d6fdef0083fca3c96f2fecae1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ConsolePlayer::doAbortTurn </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Asks the player to abort a turn asked for with doMakeTurn. </p>
<p>When this is called the <a class="el" href="class_game_logic.html" title="GameLogic implementation for a game of chess with observers. ">GameLogic</a> will no longer react to the completion of the future for that turn. A use of this function is the abortion of a turn due to timeout. </p>

<p>Implements <a class="el" href="class_abstract_player.html#a6f129cba16e36619b7672e633712b89b">AbstractPlayer</a>.</p>

</div>
</div>
<a class="anchor" id="aa464032047ef729c748fc9664739c74f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">future&lt; <a class="el" href="class_turn.html">Turn</a> &gt; ConsolePlayer::doMakeTurn </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_game_state.html">GameState</a>&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Asks the player to make his turn. </p>
<dl class="section warning"><dt>Warning</dt><dd>This function must not block. It is to return immediatly. The players turn is to be set on the returned future. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The game logic can abort its request for a player to make his turn using the doAbortTurn function at any time. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>Current state of the game. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A future to the turn to make. </dd></dl>

<p>Implements <a class="el" href="class_abstract_player.html#a4954d2cc3b71d352188c863bb3d1e176">AbstractPlayer</a>.</p>

</div>
</div>
<a class="anchor" id="a639c4cc842569ce328ab396cdac43533"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ConsolePlayer::onGameOver </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_game_state.html">GameState</a>&#160;</td>
          <td class="paramname"><em>state</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PlayerColor&#160;</td>
          <td class="paramname"><em>winner</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Called when a game started with onGameStart is over. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>State on game over. </td></tr>
    <tr><td class="paramname">winner</td><td>Winner of the game. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="class_abstract_game_observer.html#ac24e139ff56d25fb7e77afdfb35fab5c">AbstractGameObserver</a>.</p>

</div>
</div>
<a class="anchor" id="a155dbe90c6ae613bf5f37034d496c6f3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ConsolePlayer::onGameStart </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_game_state.html">GameState</a>&#160;</td>
          <td class="paramname"><em>state</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_game_configuration.html">GameConfiguration</a>&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Called when the game starts. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td><a class="el" href="class_game_state.html" title="Facade class for the game logic, holds the chessboard and the turn generator. ">GameState</a> on game start. </td></tr>
    <tr><td class="paramname">config</td><td>Valid <a class="el" href="class_game_configuration.html" title="Class for holding game configuration parameters. ">GameConfiguration</a> for this game. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="class_abstract_game_observer.html#a34fd2b4c53d3beb7c6bb3edebe185150">AbstractGameObserver</a>.</p>

</div>
</div>
<a class="anchor" id="a5acd643839da6578a9efb15b73ed4d07"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ConsolePlayer::onSetColor </td>
          <td>(</td>
          <td class="paramtype">PlayerColor&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Notifies that player what color he will be playing. </p>
<p>Called before onGameStart. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>Color the player has. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="class_abstract_player.html#a330465dd29cbd703563c89cdb48e895c">AbstractPlayer</a>.</p>

</div>
</div>
<a class="anchor" id="ac0af6ecb4eb186287510ddbd2f68a061"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ConsolePlayer::onTurnEnd </td>
          <td>(</td>
          <td class="paramtype">PlayerColor&#160;</td>
          <td class="paramname"><em>who</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_turn.html">Turn</a>&#160;</td>
          <td class="paramname"><em>turn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_game_state.html">GameState</a>&#160;</td>
          <td class="paramname"><em>newState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Called if a player ended its turn. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">who</td><td>Color of the player doing the turn. </td></tr>
    <tr><td class="paramname">turn</td><td><a class="el" href="class_turn.html" title="Represents a chess turn. ">Turn</a> the player decided on. </td></tr>
    <tr><td class="paramname">newState</td><td>State after the player performed the turn. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="class_abstract_game_observer.html#afc2f078de79701a8cd77ce733459cf6c">AbstractGameObserver</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>S:/dev/3dchess/src/misc/<a class="el" href="_console_player_8h_source.html">ConsolePlayer.h</a></li>
<li>S:/dev/3dchess/src/misc/ConsolePlayer.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Mar 9 2014 23:12:57 for 3dchess by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
